package com.dzl.enterprise.service;

import com.dzl.base.service.BaseService;
import com.dzl.enterprise.pojo.WelfareEnterpriseApiGoods;
import com.dzl.enterprise.pojo.query.WelfareEnterpriseApiGoodsQuery;
import com.dzl.enterprise.pojo.vo.WelfareEnterpriseApiGoodsVo;
import com.dzl.goods.pojo.query.WelfareGoodsManageQuery;
import com.dzl.goods.pojo.vo.WelfareSkuGoodsVo;
import com.dzl.goods.pojo.vo.WelfareGoodsManageVo;
import com.github.pagehelper.PageInfo;

import java.math.BigDecimal;
import java.util.List;

/**
 * api商品(welfare_enterprise_api_goods)表服务接口
 * @author liuguanjun
 * @date 2021-11-23 16:42:23
 */
public interface WelfareEnterpriseApiGoodsService extends BaseService<WelfareEnterpriseApiGoods> {

    /**
     * 查询企业客户api商品列表
     * @author liuguanjun
     * @date 2021-11-23 16:44:30
     * @param query 查询条件
     **/
    PageInfo<WelfareEnterpriseApiGoodsVo> getWelfareEnterpriseGoodsListPage(WelfareEnterpriseApiGoodsQuery query);

    /**
     * 根据商品id查询sku数据列表
     * @param goodsId 商品id
     * @param enterpriseId 企业id
     * @author liuguanjun
     * @date 2021-11-24 09:54:08
     **/
    List<WelfareSkuGoodsVo> getGoodsAttrsByGoodsIdAndEnterpriseId(Integer goodsId, Integer enterpriseId);

    /**
     * 添加实体商品，保存
     * @param skuIds 商品skuid
     * @param enterpriseId  企业id
     * @author liuguanjun
     * @date 2021-11-23 17:42:30
     **/
    Integer saveWelfareEnterpriseGoods(String skuIds,Integer enterpriseId);

    /**
     * 批量删除供应商商品
     * @param ids 商品id
     * @author liuguanjun
     * @date 2021-11-23 17:07:30
     **/
    Integer deleteWelfareEnterpriseGoods(String ids);

    /**
     * 修改供应商品价格
     * @param id 商品id
     * @param supplyPrice 供应商价格
     * @author liuguanjun
     * @date 2021-11-23 17:07:30
     **/
    Integer updateWelfareEnterpriseGoodsSupplyPriceById(Integer id, BigDecimal supplyPrice);

    /**
     * 批量修改供应商品价格
     * @param ids 商品id
     * @param floatingRatio 上浮比例
     * @author liuguanjun
     * @date 2021-11-23 17:12:30
     **/
    Integer batchUpdateWelfareEnterpriseGoodsSupplyPrice(String ids, Double floatingRatio);


}
